home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
nivb
/
nwqueue.bas
< prev
next >
Wrap
BASIC Source File
|
1995-05-09
|
5KB
|
84 lines
'NWPRTQUE.BAS NetWare Print Queue Services Interface for Visual Basic For Windows
'Version 1.0
'Novell Systems Research Department, Novell, Inc.
'Copyright (c) 1993, Novell, Inc.
'This interface is not supported through Novell's regular
'support channels. See README.TXT for more information.
'Queue Job Control Flags
Global Const QF_OPERATOR_HOLD = &H80
Global Const QF_USER_HOLD = &H40
Global Const QF_ENTRY_OPEN = &H20
Global Const QF_SERVICE_RESTART = &H10
Global Const QF_AUTO_START = &H8
'Queue Status Flags
Global Const QS_CANT_ADD_JOBS = &H1
Global Const QS_SERVERS_CANT_ATTACH = &H2
Global Const QS_CANT_SERVICE_JOBS = &H4
'Error return codes
Global Const Q_ERROR = 208
Global Const NO_QUEUE = 209
Global Const NO_Q_SERVER = 210
Global Const NO_Q_RIGHTS = 211
Global Const Q_FULL = 212
Global Const NO_Q_JOB = 213
Global Const NO_JOB_RIGHTS = 214
Global Const Q_SERVICING = 215
Global Const STN_NOT_SERVER = 217
Global Const Q_NOT_ACTIVE = 216
Global Const Q_HALTED = 218
Global Const MAX_Q_SERVERS = 219
Type JOB_STRUCT
reserved As String * 10
clientStation As Long
clientTaskNumber As Long
clientIDNumber As Long
targetServerIDNumber As Long
targetExecutionTime As String * 6
jobEntryTime As String * 6
jobNumber As Long
jobType As Integer
jobPosition As Integer
jobControlFlags As Integer
jobFileName As String * 14
jobFileHandle As String * 6
serverStation As Long
serverTaskNumber As Long
serverIDNumber As Long
textJobDescription As String * 50
clientRecordArea As String * 152
End Type
Type STATUS_RECORD
record As String * 64
End Type
Declare Function AbortServicingQueueJobAndFile Lib "NWNETAPI.DLL" (ByVal queueID&, ByVal jobNumber&, ByVal fileHandle%) As Integer
Declare Function AttachQueueServerToQueue Lib "NWNETAPI.DLL" (ByVal queueID&) As Integer
Declare Function ChangeQueueJobEntry Lib "NWNETAPI.DLL" (ByVal queueID&, Job As JOB_STRUCT) As Integer
Declare Function ChangeQueueJobPosition Lib "NWNETAPI.DLL" (ByVal queueID&, ByVal jobNumber&, ByVal newPosition%) As Integer
Declare Function ChangeToClientRights Lib "NWNETAPI.DLL" (ByVal queueID&, ByVal jobNumber&) As Integer
Declare Function CloseFileAndAbortQueueJob Lib "NWNETAPI.DLL" (ByVal queueID&, ByVal jobNumber&, ByVal fileHandle%) As Integer
Declare Function CloseFileAndStartQueueJob Lib "NWNETAPI.DLL" (ByVal queueID&, ByVal jobNumber&, ByVal fileHandle%) As Integer
Declare Function CreateQueue Lib "NWNETAPI.DLL" (ByVal queueName$, ByVal queueType%, ByVal directoryHandle%, ByVal pathName$, queueID&) As Integer
Declare Function CreateQueueJobAndFile Lib "NWNETAPI.DLL" (ByVal queueID&, Job As JOB_STRUCT, fileHandle%) As Integer
Declare Function DestroyQueue Lib "NWNETAPI.DLL" (ByVal queueID&) As Integer
Declare Function DetachQueueServerFromQueue Lib "NWNETAPI.DLL" (ByVal queueID&) As Integer
Declare Function FinishServicingQueueJobAndFile Lib "NWNETAPI.DLL" (ByVal queueID&, ByVal jobNumber&, ByVal charge&, ByVal fileHandle%) As Integer
Declare Function GetQueueJobList Lib "NWNETAPI.DLL" (ByVal queueID&, jobCount&, jobNumberList&, ByVal maxJobNumbers&) As Integer
Declare Function GetQueueJobsFileSize Lib "NWNETAPI.DLL" (ByVal queueID&, ByVal jobNumber&, fileSize&) As Integer
'serverIDList is an array of maxNumberOfServers Longs
'serverStationList is an array of maxNumberOfServers Longs
Declare Function ReadQueueCurrentStatus Lib "NWNETAPI.DLL" (ByVal queueID&, queueStatus&, numberOfJobs&, numberOfServers&, serverIDList&, serverStationList&, ByVal maxNumberOfServers&) As Integer
Declare Function ReadQueueJobEntry Lib "NWNETAPI.DLL" (ByVal queueID&, ByVal jobNumber&, Job As JOB_STRUCT) As Integer
Declare Function ReadQueueServerCurrentStatus Lib "NWNETAPI.DLL" (ByVal queueID&, ByVal serverID&, ByVal serverStation&, serverStatusRecord As STATUS_RECORD) As Integer
Declare Function RemoveJobFromQueue Lib "NWNETAPI.DLL" (ByVal queueID&, ByVal jobNumber&) As Integer
Declare Function RestoreQueueServerRights Lib "NWNETAPI.DLL" () As Integer
Declare Function ServiceQueueJobAndOpenFile Lib "NWNETAPI.DLL" (ByVal queueID&, ByVal targetJobType%, Job As JOB_STRUCT, fileHandle%) As Integer
Declare Function SetQueueCurrentStatus Lib "NWNETAPI.DLL" (ByVal queueID&, ByVal queueStatus&) As Integer
Declare Function SetQueueServerCurrentStatus Lib "NWNETAPI.DLL" (ByVal queueID&, serverStatusRecord As STATUS_RECORD) As Integer